USE [SONALIKA_BGK_UPDATED]
GO

/****** Object:  Table [dbo].[JOB_COMPLAINTS]    Script Date: 07-Jun-14 11:53:34 PM ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[JOB_COMPLAINTS](
	[COMPLAINT_ID] [int] IDENTITY(1,1) NOT NULL,
	[JOB_CARD_ID] [int] NOT NULL,
	[ACTUAL_COMPLAINT] [varchar](max) NULL,
	[ACTION_TAKEN] [varchar](max) NULL,
	[LABOUR_CHARGES] [decimal](18, 2) NULL,
 CONSTRAINT [PK_JOBCOMPLAINTS] PRIMARY KEY CLUSTERED 
(
	[COMPLAINT_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

ALTER TABLE [dbo].[JOB_COMPLAINTS]  WITH CHECK ADD  CONSTRAINT [FK_JOB_COMPLAINTS_JOB_CARDS] FOREIGN KEY([JOB_CARD_ID])
REFERENCES [dbo].[JOB_CARDS] ([JOBCARD_ID])
GO

ALTER TABLE [dbo].[JOB_COMPLAINTS] CHECK CONSTRAINT [FK_JOB_COMPLAINTS_JOB_CARDS]
GO

